import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.14

//import "qrc:/common"
//import "qrc:/pages"
//import "qrc:/pages/QianProjectPages"
//import "qrc:/pages/QianProjectPages/QianMergeWatermelonPage"
//import "qrc:/pages/QianProjectPages/QianDragViewPage"


import "qrc:/_context/Page"
import "qrc:/_context/Modbus"

StackLayout {
    id: stack
    clip: true
    function switchPage(name) {
        for (var i = 0; i < stack.data.length; i++) {
            if (stack.data[i].name === name) {
                stack.currentIndex = i;
                break;
            }
        }
    }

    // 连接数据库
    DbConnect{
        property string name: "Connect"
        width: stack.width
        height: stack.height
    }

    // 数据库操作
    DbOperate{
        property string name: "Operate";
        width: stack.width;
        height: stack.height;
    }

    // 通导设备
    SailDevice{
        property string name: "Sail";
        width: stack.width;
        height: stack.height;

    }

    // 机舱设备：手动配置
    EngineManual{
        property string name: "Manual";
        width: stack.width;
        height: stack.height;
    }
    // 机舱配置数据入库
    EngineSQL{
        property string name: "Cfg2DB";
        width: stack.width;
        height: stack.height;
    }

    // 机舱设备：自动配置
    EngineAuto{
        property string name: "Automatic";
        width: stack.width;
        height: stack.height;
    }

    // Modbus 协议使用说明
    ModbusShow{
        property string name: "Modbus";
        width: stack.width;
        height: stack.height;
    }


    /*
    BaseControlPage {
        property string name: "Buttons"
        width: stack.width
        height: stack.height

    }
    BaseOtherControlPage {
        property string name: "Other"
        width: stack.width
        height: stack.height
    }
    HintPage{
        property string name: "提示"
        width: stack.width
        height: stack.height
    }

    QianPhotoPage {
        property string name: "图片预览器"
        width: stack.width
        height: stack.height
    }

    QianMergeWatermelonPage {
        property string name: "合成大西瓜"
        width: stack.width
        height: stack.height
    }

    QianDragViewPage {
        property string name: "DragView"
        width: stack.width
        height: stack.height
    }
    */

}
